﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Data.GameData;
using Data.GameData.GameMap;
using Data.GameData.Interfaces;
using GUIFramework.Interfaces;
using GUIComponents;
using WeifenLuo.WinFormsUI.Docking;

namespace GUIFactory
{
    public class ViewFactory : IGUIFactory
    {
        public DockContent BuildView(ViewType viewType)
        {
            DockContent view = null;

            switch (viewType)
            {
                case ViewType.vtMAP_TACTICAL:
                    {
                        view = new GameMapWindow(MapType.TACTICAL);
                        break;
                    }
                case ViewType.vtMAP_STRATEGIC:
                    {
                        view = new GameMapWindow(MapType.STRATEGIC);
                        break;
                    }
                case ViewType.vtTOOLBOX_KNOWNRACES:
                    {
                        view = new KnownRacesToolbox();
                        break;
                    }
                case ViewType.vtTOOLBOX_SYSTEMLIST:
                    {
                        view = new SystemListToolbox();
                        break;
                    }
                case ViewType.vtTOOLBOX_FLEETLIST:
                    {
                        view = new FleetListToolbox();
                        break;
                    }
                case ViewType.vtTOOLBOX_ECONOMY:
                    {
                        view = new EmpireEconomyToolbox();
                        break;
                    }
                default:
                    throw new NotImplementedException("Not a valid view type.");
            }

            return view;
        }
    }
}
